package com.example.petstoreservice.mapper;

import com.example.petstoreservice.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper {
    List<Order> getAllOrders();
    List<Order> getOrdersByUserName(@Param("userName") String userName);
    int insertOrder(Order order);
    int updateOrder(Order order);
    int deleteOrder(Long orderId);
    Order getOrderByOrderId(Long orderId);
    int updateOrderStatus(@Param("orderId") Long orderId, @Param("status") String status);
    List<Order> getOrderByUsernameAndStatus(@Param("username") String username,@Param("status") String status);
    int refund(Long orderId,String info,String status);

}
